<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [10,20,30,40,null,undefined];
        console.log(arr.join());//10,20,30,40
        console.log(arr.join("|"));//10|20|30|40
        console.log(arr.join(""));//10203040
        console.log(arr.join(" "));//10 20 30 40
        
        var arr1 = ["hello","world"];
        var result =arr1.join(" ");
        console.log(result);
        console.log(result.split(" "));
    </script>
</body>
</html>